$(window).resize(function()
{    
    diff = Math.floor((window.innerHeight-$('.container').height())/2)+'px';     
    $('div[class=container]').animate({'margin-top':diff},500);
    
}).resize();

$(document).ready(function()
{
  $(window).resize(); 
   
});